﻿using System;
using System.Collections.Generic;

namespace Anderson.NetLobby.Common
{
    public class NetLobbyDefination
    {
        public const uint NET_MESSAGE_BOF           = 0xF000F000;
        public const uint NET_MESSAGE_EOF           = 0x0FFF0FFF;

        public const int ROOM_MIN_PLAYERCOUNT       = 2;
        public const int ROOM_MAX_PLAYERCOUNT       = 10;

        public const int SERVER_DEFAULT_PORT        = 1978;
        public const int SERVER_MAX_PLAYERCOUNT     = 200; 
        public const int SERVER_MAX_ROOMCOUNT       = 50;
        
    }

    [Serializable]
    public class HeartCallback
    {
        public HeartCallback(Action<long> action)
        {
            this.action = action;
        }

        public HeartCallback(Action<long> action, long param)
        {
            this.action = action;
            this.param = param;
        }

        public Action<long> action;
        public long param;
    }

    [Serializable]
    public class JsonList<T>
    {
        public List<T> list = new List<T>();
    }

}